Skip to content

Clarify .netrc content for JS library docs#3090

Open
s-stumbo wants to merge 6 commits intomainfrom
repo-updates
Open

Clarify .netrc content for JS library docs#3090
s-stumbo wants to merge 6 commits intomainfrom
repo-updates

Conversation

@s-stumbo
Copy link
Contributor

[ ] Check if this is a typo or other quick fix and ignore the rest :)

Type of change

Clarify existing content around direct access for JS

What should this PR do?

  • Clarify that you do need to auth for Chainguard Repository, but it can be an existing pull token
  • Update content to explain that .netrc doesn't work for direct npm
  • Add chainctl auth pull-token --output env as path for direct npm access

Why are we making this change?

What are the acceptance criteria?

  • Make sure content is clear and accurate

How should this PR be tested?

Follow the docs to test out setting up Chainguard repo for JS

Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
@s-stumbo s-stumbo requested a review from a team as a code owner March 17, 2026 15:47
@netlify
Copy link

netlify bot commented Mar 17, 2026

Deploy Preview for ornate-narwhal-088216 ready!

Name Link
🔨 Latest commit d14b13e
🔍 Latest deploy log https://app.netlify.com/projects/ornate-narwhal-088216/deploys/69bdac2018c9d8000817c120
😎 Deploy Preview https://deploy-preview-3090--ornate-narwhal-088216.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
Copy link
Collaborator

@matthewhelmke matthewhelmke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test the new code, but it passes a sanity check. It should work. If you trust the source and/or have tested it yourself, I think this LGTM.

in the [access documentation](/chainguard/libraries/access/#pull-token).

For npm, pnpm, and Yarn, registry credentials must be supplied via their own
configuration systems (for example, `.npmrc` or .`yarnrc.yml`). The `.netrc`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we saying that .netrc is not supported here .. its not necessary to say that .. we never imply anywhere that it is supported and there are many others ways that are also not supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this update in response to some internal confusion around this process. I removed this direct callout

Copy link
Member

@mosabua mosabua Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is still confusion we could maybe consider reordering those sections for each tool and basically documenting the minimal example first (which uses direct access) and then expand towards repo manager and so on. It might be a good time to think this through now while you are working towards doing the same minimal examples for Java and Python build tools.

In all cases though you have to keep in mind that the language ecosystem is just the umbrella.. really you have to document the approach for each tool since they all behave differently.

Happy to chat on a call any time as well btw @s-stumbo

sections](#minimal-example-project) on this page for per-tool authentication
setup.

The fastest way to get credentials and configure your project in one step is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate this here and not just refer to the minimal example?


The fastest way to get credentials and configure your project in one step is
with chainctl:
```bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also keep in mind that this all is for direct access only .. which we still consider not as good as using a repo manager .. so it should not be as prominent

The fastest way to get credentials and configure your project in one step is
with chainctl:
```bash
eval $(chainctl auth pull-token --output env --repository=javascript --parent=<your-org>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works for npm .. so it should not be documented here in the generic section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, updated the existing command in the npm section. The internal feedback was that the command needed auth pull-token --output env to work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is documented in the access site and its not really recommended to run the eval all the time .. that way you get a new token all the time .. its better to create a .env file once and then just source that .. I can show you more

Signed-off-by: s-stumbo <sally.stumbo@chainguard.dev>
@s-stumbo s-stumbo requested a review from mosabua March 20, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants